import {myRequest} from './http.js';

// 获取用户信息
export function getUserInfo(data){
	return myRequest({
		url:'/api/User/index',
		method:'post',
		data:''
	})
}
// 编辑用户信息
export function setUserInfo(data){
	return myRequest({
		url:'/api/User/profile',
		method:'post',
		data:data
	})
}

// 退出登录
export function logout(data){
	return myRequest({
		url:'/api/User/logout',
		method:'post',
		data:data
	})
}

// 发送验证码
export function sendCode(data){
	return myRequest({
		url:'/api/Sms/send',
		method:'post',
		data:data
	})
}
// 修改手机号吗
export function changeMobile(data){
	return myRequest({
		url:'/api/User/changemobile',
		method:'post',
		data:data
	})
}

// 获取供应商详情
export function supplyDetail(data){
	return myRequest({
		url:'/api/Supplier/getSupplierDetail',
		method:'post',
		data:''
	})
}

// 保存供应商信息
export function supplyRegister(data){
	return myRequest({
		url:'/api/Supplier/saveSupplierDetail',
		method:'post',
		data:data
	})
}

// 获取银行信息
export function bankDetail(data){
	return myRequest({
		url:'/api/Supplier/getBankInfo',
		method:'post',
		data:data
	})
}
// 保存银行信息
export function setBankInfo(data){
	return myRequest({
		url:'/api/Supplier/saveBankInfo',
		method:'post',
		data:data
	})
}

// 获取合同列表
export function contractList(data){
	return myRequest({
		url:'/api/Supplier/getSupplierContractList',
		method:'post',
		data:data
	})
}

// 出售订单列表
export function sellList(data){
	return myRequest({
		url:'/api/Supplier/getPurchaseStorageList',
		method:'post',
		data:data
	})
}
// 出售订单详情
export function sellOrderInfo(data){
	return myRequest({
		url:'/api/Supplier/getPurchaseStorageDetail',
		method:'post',
		data:data
	})
}

// 上传提货单
export function uploadReal(data){
	return myRequest({
		url:'/api/Supplier/supplierUploadReal',
		method:'post',
		data:data
	})
}

// 供应商上传卸货单，确认收货
export function uploadUnloadFile(data){
	return myRequest({
		url:'/api/Supplier/confirmReceipt',
		method:'post',
		data:data
	})
}


// 采购入库单可结算列表
export function supplySettlementList(data){
	return myRequest({
		url:'/api/Supplier/getSupplierSettlementInboundList',
		method:'post',
		data:data
	})
}

// 采购入库订单发起结算
export function supplySettlement(data){
	return myRequest({
		url:'/api/Supplier/supplierSettlement',
		method:'post',
		data:data
	})
}

// 结算单列表
export function getSettlement(data){
	return myRequest({
		url:'/api/Supplier/getSupplierSettlementList',
		method:'post',
		data:data
	})
}

// 上传发票
export function uploadInvoice(data){
	return myRequest({
		url:'/api/Supplier/supplierSettlementInvoice',
		method:'post',
		data:data
	})
}

// 获取清算金额
export function getClearOrder(data){
	return myRequest({
		url:'/api/Supplier/getSupplierPaymentList',
		method:'post',
		data:data
	})
}

// 发票列表
export function getInvoice(data){
	return myRequest({
		url:'/api/Supplier/getSupplierInvoiceList',
		method:'post',
		data:data
	})
}

//获取供应商信息
export function supplyMsg(data){
	return myRequest({
		url:'/api/Supplier/getMessage',
		method:'get',
		data:data,
		noLoading:true
	})
}

// 设置消息已读
export function readMsg(data){
	return myRequest({
		url:'/api/Supplier/readMessage',
		method:'post',
		data:data,
		noLoading:true
	})
}